---触发释放技能
---*
---* [0] 技能id
---* [1] 目标类型 0:为null,让技能自行查找目标 1:buff来源，2:buff目标  3:可变长度参数[0];
---* [2] 技能归属 (0:buff来源   1:buff拥有者)
---@class BuffEffect5 : BaseBuffEffect
BuffEffect5 = ClientFight.CreateClass("BuffEffect5", ClientFight.BaseBuffEffect)
local t = BuffEffect5

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = { ... }
    local f_BuffEffectValue = buff.buffBean.f_BuffEffectValue
    local skillId = f_BuffEffectValue[1];

    SkillRoleMgr.savePathFile( "[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff"
    .. buff.modelId .. " 触发释放技能：" .. skillId);
    local targetType = f_BuffEffectValue[2];
    local fighterType = f_BuffEffectValue[3];
    local target = nil;
    local fighter;
    if (targetType == 1) then
        target = buff.source
    elseif (targetType == 2) then
        target = buff.target
    elseif (targetType == 3) then
        target = parameters[1];
    end
    if (fighterType == 1) then
        fighter = buff.target
    else
        fighter = buff.source
    end
    local b = self:triggerSkill(fight, fighter, target, skillId);
    if (not b) then
        return IBuffEffect.FAIL;
    end
    return ClientFight.BaseBuffEffect.action(self,fight, buff, ...);
end

t.New()